#!/usr/bin/env python
#-*- coding:utf-8 -*-

# ( ) < > [ ] { }
brackets = [40, 41, 60, 62, 91, 93, 123, 125]
spaces = [32, 9, 13, 10]
quotes = [34, 39]
tokenchars = ['-', '_']

def isQuote(c):
    o = ord(c)
    return o in quotes
    
def isSpace(c):
    o = ord(c)
    return o in spaces
    
def isLineSpace(c):
    o = ord(c)
    return o == 13 or o== 10
    
def isNum(c):
    o = ord(c)
    return o >=48 and o <= 57
    
def isAlp(c):
    o = ord(c)
    return (o >= 65 and o <= 90) or (o >= 97 and o <= 122)
    
def isBracket(c):
    o = ord(c)
    return o in brackets
    
def isToken(c):
    return isNum(c) or isAlp(c) or c == '_' or c == '-'
